home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1994 November: Tool Chest / Dev.CD Nov 94.toast / Sample Code / Newton Sample Code 1.2 / Drawing / GetPoly-1 / README.GetPoly < prev   
Encoding:
Text File  |  1994-07-07  |  932 b   |  26 lines  |  [TEXT/R*ch]

  1. GetPoly
  2. ©1993-1994 Apple Computer. All rights reserved.
  3. by J. Christopher Bell
  4.  
  5.  
  6. This example shows how you can acquire a "points" structure for use with a
  7. clPolygonView.
  8.  
  9. The GetPoly sample uses two techniques, one using shape recognition and another
  10. using all points in a pen stroke. To use shape recognition, the points structure
  11. is simply cloned in the editView's addChildScript.
  12.  
  13. To capture the information from a clView, the stroke data is captured in the
  14. viewClickScript and converted into an object which can be used as a points
  15. structure.
  16.  
  17. Notes on the sample:
  18.  
  19. The shadowView clPolygonView is used to 'draw' the polygon that is input to the clView.
  20.  
  21. To remove items from the clEditView, just scrub them
  22.  
  23. Notice that if you draw something closely approximating a circle (or triangle
  24. or...) in the clEditView, the result is a circle. If you do the same thing in
  25. the clEditView, you just get the points, there is no cleanup.
  26.